package com.ds.controller;

import java.util.List;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ds.dao.CompanyInfoDAO;
import com.ds.entity.CompanyInfoEntity;
import com.ds.entity.DSResult;
import com.ds.entity.IndustryEntity;

@RestController
@Api(value = "公司接口", tags = { "公司接口" })
@RequestMapping("company")
public class CompanyController {
	
	@Autowired
	CompanyInfoDAO companyInfoDAO ;
	
	@ApiOperation(value = "获取公司信息")
	@PostMapping("/list")
	public DSResult<List<CompanyInfoEntity>> list(CompanyInfoEntity c ){
		//c.setStatus("1");
		return  new DSResult<List<CompanyInfoEntity>>(companyInfoDAO.selectDsCompanyInfoList(c));
	}
	
	@ApiOperation(value = "获取行业信息")
	@PostMapping("/industryList")
	public DSResult<List<IndustryEntity>> industryList(){
		List<IndustryEntity> data = companyInfoDAO.getIndustryList();
		return  new DSResult<List<IndustryEntity>>(data);
	}

}
